package main

import "fmt"

type prototype interface {
	copy()
}

type Student struct {
	School string
	Major string
	Name string
}

func (s *Student) copy() Student {
	return *s
}

func (s Student) PrintInfo() {
	fmt.Printf("School = %s, Major = %s, Name = %s \n", s.School, s.Major, s.Name)
}

func main() {
	student1 := Student{School:"清华大学", Major:"计算机", Name:"张三"}
	student1.PrintInfo()

	student2 := student1.copy()
	student2.Name = "李四"
	student2.Major = "数学"
	student2.PrintInfo()

	student1.PrintInfo()
}
